package syllabus.service.impl;

import java.util.List;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import syllabus.dao.PUserRoleMapper;
import syllabus.model.Criteria;
import syllabus.model.PUserRole;
import syllabus.service.PUserRoleService;

@Service
public class PUserRoleServiceImpl implements PUserRoleService {
    @Autowired
    private PUserRoleMapper pUserRoleMapper;

    private static final Logger logger = LoggerFactory.getLogger(PUserRoleServiceImpl.class);

    public int countByExample(Criteria example) {
        int count = this.pUserRoleMapper.countByExample(example);
        logger.debug("count: {}", count);
        return count;
    }

    public PUserRole selectByPrimaryKey(Integer id) {
        return this.pUserRoleMapper.selectByPrimaryKey(id);
    }

    public List<PUserRole> selectByExample(Criteria example) {
        return this.pUserRoleMapper.selectByExample(example);
    }

    public int deleteByPrimaryKey(Integer id) {
        return this.pUserRoleMapper.deleteByPrimaryKey(id);
    }

    public int updateByPrimaryKeySelective(PUserRole record) {
        return this.pUserRoleMapper.updateByPrimaryKeySelective(record);
    }

    public int updateByPrimaryKey(PUserRole record) {
        return this.pUserRoleMapper.updateByPrimaryKey(record);
    }

    public int deleteByExample(Criteria example) {
        return this.pUserRoleMapper.deleteByExample(example);
    }

    public int updateByExampleSelective(PUserRole record, Criteria example) {
        return this.pUserRoleMapper.updateByExampleSelective(record, example);
    }

    public int updateByExample(PUserRole record, Criteria example) {
        return this.pUserRoleMapper.updateByExample(record, example);
    }

    public int insert(PUserRole record) {
        return this.pUserRoleMapper.insert(record);
    }

    public int insertSelective(PUserRole record) {
        return this.pUserRoleMapper.insertSelective(record);
    }
}